﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;

public partial class Perfiles : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Session["CadenaDeConexion"] = ConfigurationManager.ConnectionStrings["RFID"].ConnectionString;
    }
    protected void LinkButtonAddNew_Click(object sender, EventArgs e)
    {
        FormViewPerfil.Visible = true;
    }
    protected void FormViewPerfil_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {
        limpiarFormulario();
    }
    private void limpiarFormulario()
    {
        FormViewPerfil.Controls.Clear();
        FormViewPerfil.Visible = false;
    }
    protected void InsertCancelButton_Click(object sender, EventArgs e)
    {
        limpiarFormulario();
    }
    protected void GridViewPerfiles_SelectedIndexChanged(object sender, EventArgs e)
    {
        GridViewUsuariosDelPerfil.DataBind();
        GridViewUsuariosDelPerfil.Visible = true;
    }
    protected void ObjectDataSourcePerfiles_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
    {
           LabelEntrada.Text = e.OutputParameters["mensaje"].ToString();
    }
}
